// 异步操作 导出数据的两种方式 一种是callback 一种是Promise
/*
function fn (callback) {
    setTimeout(() => {
        let a = 10
        callback(a)
    })
}
fn(function(a) {
    console.log(a)
})
*/
function fn () {
    return new Promise((resolve, reject) => {
        setTimeout(() => {
            let a = 10
            resolve(a)
        })
    })
}
fn().then(a => {
    console.log(a)
})
// export default fn